/* ===== 内容区重构 ===== */
.content-area {
    padding: 0;
    background: transparent;
}

.content-container {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 20px 40px;
    height: auto;
    min-height: calc(100vh - 48px);
}

/* ===== 用户信息卡片设计 ===== */
.user-profile-container {
    background: linear-gradient(135deg, #2b2d31 0%, #1e1f22 100%);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid #40444b;
}

.profile-title {
    font-size: 28px;
    color: #fff;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #40444b;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #7289da 0%, #5b6eae 100%);
    border-radius: 3px;
}

/* ===== 表单分区设计 ===== */
.form-section {
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(40, 42, 46, 0.5);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid #36393f;
}

.form-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: #7289da;
}

.section-title {
    font-size: 20px;
    color: #7289da;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== 表单元素优化 ===== */
.form-row {
    display: flex;
    gap: 25px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    color: #b5bac1;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-input {
    width: 100%;
    padding: 14px;
    background: #1e1f22;
    border: 1px solid #111214;
    border-radius: 8px;
    color: #fff;
    transition: all 0.3s;
    font-size: 15px;
}

.form-input:focus {
    border-color: #7289da;
    box-shadow: 0 0 0 3px rgba(114, 137, 218, 0.3);
    outline: none;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237289da' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* ===== 按钮区域 ===== */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #40444b;
}

.btn {
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    border: none;
    font-weight: 600;
    transition: all 0.3s;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary {
    background: linear-gradient(135deg, #4e5058 0%, #3a3c42 100%);
    color: #f2f3f5;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5d6069 0%, #4a4c53 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #7289da 0%, #5b6eae 100%);
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #677bc4 0%, #4f5f9e 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(114, 137, 218, 0.3);
}

/* 头像上传区域 */
.avatar-upload {
    display: flex;
    align-items: center;
    gap: 40px;
    margin: 20px 0;
}

/* 头像容器 - 修复图片自适应问题 */
.avatar-preview-container {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #7289da;
    background-color: #2f3136;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.avatar-preview-container:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* 修复绝对定位方案 */
.avatar-preview-container {
    position: relative;
}

.avatar-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 关键属性：保持比例填充容器 */
    object-position: center; /* 关键属性：居中显示 */
    transition: all 0.3s;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(114, 137, 218, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s;
    gap: 8px;
    z-index: 2;
}

.avatar-preview-container:hover .avatar-overlay {
    opacity: 1;
}

.avatar-upload-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 按钮样式 */
#upload-btn, #reset-avatar-btn {
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: center;
    justify-content: center;
}

#upload-btn:hover {
    background: linear-gradient(135deg, #677bc4 0%, #4f5f9e 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(114, 137, 218, 0.3);
}

#reset-avatar-btn:hover {
    background: linear-gradient(135deg, #5d6069 0%, #4a4c53 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-container {
        padding: 15px;
    }

    .user-profile-container {
        padding: 25px;
    }

    .form-row {
        flex-direction: column;
        gap: 20px;
    }

    .avatar-upload {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
